import React, { FC } from 'react'
import { Typography, Rate } from 'antd'
import { QuestionRateDefaultProps, QuestionRatePropsType } from './interface'
const { Paragraph } = Typography
const QuestionRate: FC<QuestionRatePropsType> = (props: QuestionRatePropsType) => {
  const { title, rateCount, defaultValue, rateValue } = { ...QuestionRateDefaultProps, ...props }
  return (
    <div>
      <Paragraph strong>{title}</Paragraph>
      <Rate count={rateCount} defaultValue={defaultValue} value={rateValue} />
    </div>
  )
}

export default QuestionRate
